package com.novel.utils;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class GetNovel extends HttpServlet {

	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = request.getParameter("id");
		InsertDao dao = new InsertDao();
		NovelBean bean = dao.getContent(id);
		request.setAttribute("bean", bean);
		request.getRequestDispatcher("/novel.jsp").forward(request, response);
		//response.sendRedirect("/Novel/novel.jsp");

	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doGet(request, response);
	}

}
